<%@ page language="java" contentType="text/html; charset=UTF8"
    pageEncoding="UTF8"%>
    
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>  
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF8">
    <title>Articles</title>  
<link rel="stylesheet" type="text/css" href="common/css/allArticle.css">
</head>
<body>
<div class="product-header-content">
		<div class="logo">
			<img src="common/images/logoLeft.png">
		</div>
		<div class="logoRight">
		<img src="common/images/logoRight.png">
		</div>
</div>
<div class="buttonlist">
	<!-- <button type="button" class="btn7" value="Add" onclick="window.location.href='toAdd.action'" >增&nbsp;&nbsp;&nbsp;加</button> -->
	<button type="button" class="btn6" id="back"  onclick="window.location.href='Announcements.action'">返&nbsp;&nbsp;&nbsp;回</button>
</div>
<table border="1"  class="datalist" >  
        <tbody>  
        <caption class="title" style="margin-left: 32px;font-size=20px">Article List</caption> 
            <tr>  
                <th>ID</th>  
                <th class="altrow">SUBJECT</th>  
                <th class="altrow">SENDER</th>
                <th>TIME</th>
                <th class="altrow">IF_DELETE</th>
                <th>VALID_TIME</th>
                <th>INVALID_TIME</th>
                <th>ACTION</th>
            </tr>  
            <c:if test="${!empty unreadList }">  
                <c:forEach items="${unreadList}" var="article">  
                    <tr>  
                        <td>${article.article_id }</td>  
                        <td>${article.subject }</td>
                        <td>${article.sender }</td>  
                        <td>${article.time }</td>  
                        <td>${article.if_delete }</td>  
                        <td>${article.valid_time }</td>  
                        <td>${article.invalid_time }</td>    
                        <td>  
                        <%-- <button type="button" class="btn4" id="back" onclick= "window.location='toEdit.action?article_id=${article.article_id}'">修&nbsp;&nbsp;改</button> 
                        <button type="button" class="btn5" id="back" onclick= "window.location='deleteArticle.action?article_id=${article.article_id}'">删&nbsp;&nbsp;除</button>  --%>       
                        </td>  
                    </tr>               
                </c:forEach>  
            </c:if>  
        </tbody>  
    </table>
    <div class="navi" style="width: 260px;margin: 0 auto;padding-top: 20px;">
    	<a href="unreadList.action?number=1">首页</a>
		<a href="unreadList.action?number=${sessionScope.number-1}">上一页</a>
		<a href="unreadList.action?number=${sessionScope.number+1}">下一页</a>
		<a href="unreadList.action?number=${sessionScope.count}">尾页</a>
		<font>当前第${sessionScope.number}/${sessionScope.count}</font>
	</div>
</body>
</html>